#ifndef List_h
#define List_h

struct Element
{
	void* value;
	struct Element *next;
};

typedef struct Element Element;

struct List
{
	Element* firstElement;
	Element* currentElement;
	int count;
};

typedef struct List List;
const int startIndex = 0;

/**************************************************************
List Methods
**************************************************************/
List* listConstruct(Element* first);
void listDeconstruct(List *list);

void listAddElement(List *list, Element* newElement);
void listAddElementToFront(List *list, Element* newElement);
void listDeleteElement(List *list, Element* element);
List* listCopy(List *list);
void listPrepareForLooping(List *list);
Element* listNextElement(List *list);
Element* listElementAtIndex(List *list, int index);

/**************************************************************
Element Methods
**************************************************************/
Element* elementConstruct(void* value);
void elementDeconstruct(Element* element);

#endif